﻿using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace EMS系统定时任务
{
    public class EquipJob : IJob
    {
        public static AddMsgToListBox addMsgToListBOx = null; // 给委托赋值

        public void Execute(IJobExecutionContext context)
        {
            Thread thread = new Thread(new ThreadStart(() => {
                //Console.WriteLine("开始执行定时任务:" + DateTime.Now.ToString());
                addMsgToListBOx("EquipJob开始执行定时任务:" + DateTime.Now.ToString());

            }));
            thread.Start();
            thread.IsBackground = true;
        }
    }
}
